<template>
  <el-dialog title="出票成功"
             append-to-body
             :close-on-click-modal="false"
             @close="$emit('close')" :visible.sync="visible">
    <el-form inline size="mini">
      <div>
        <el-form-item label="PNR">
          <span style="display: inline-block" class="w200">{{data.pnr}}</span>
        </el-form-item>
        <el-form-item label="总票价">
          <span style="display: inline-block" class="w200">{{data.payPrice}}</span>
        </el-form-item>
      </div>
      <div style="margin-bottom: 20px">
        <el-table class="el-easy-ui-table" stripe border :data="data.priceList">
          <el-table-column label=" " type="index" width="40"/>
          <el-table-column prop="ticketPar" label="票面价" min-width="65"/>
          <el-table-column prop="tax" label="税" min-width="65"/>
          <el-table-column prop="payPrice" label="支付金额" min-width="65"/>
          <el-table-column prop="rebates" label="返点" min-width="65">
            <template slot-scope="scope">
              {{(scope.row.rebates || 0) * 100}}%
            </template>
          </el-table-column>
          <el-table-column prop="fixedFee" label="规定费率">
            <template slot-scope="scope">
              {{(scope.row.fixedFee || 0) * 100}}%
            </template>
          </el-table-column>
        </el-table>
      </div>
      <div>
        <el-table class="el-easy-ui-table" stripe border :data="data.passengerList">
          <el-table-column label=" " type="index" width="40"/>
          <el-table-column prop="ticketNo" label="票号" min-width="120"/>
          <el-table-column prop="passengerName" label="乘机人" min-width="80"/>
        </el-table>
      </div>
    </el-form>
    <div slot="footer" class="center-box">
      <el-button type="primary" @click="visible = false">确  定</el-button>
    </div>
  </el-dialog>
</template>

<script>

export default {
  name: 'IssueSuccessDialog',
  props: {
    data: {
      type: Object,
      default () {
        return {
          pnr: null,
          code: '',
          message: '',
          tickets: null,
          yeepayOrderId: null,
          airlineOrderId: null,
          payPrice: null,
          balance: null,
          pnrInfo: null,
          payWay: null,
          tripList: null,
          priceList: [],
          passengerList: []
        }
      }
    }
  },
  data () {
    return {
      visible: true
    }
  },
  created () {},
  methods: {}
}
</script>

<style></style>
